<template>
  <demoBlock title="基础用法" padding>
    <vcu-cell is-link title="提示弹窗" @click="onClickAlert" />
    <vcu-cell is-link title="提示弹窗（无标题）" @click="onClickAlert2" />
    <vcu-cell is-link title="确认弹窗" @click="onClickConfirm" />
  </demoBlock>
</template>


<script>
import { defineComponent, ref } from "vue";
import { Dialog } from "../../../components";
export default defineComponent({
  setup() {
    const onClickAlert = () => {
      Dialog.alert({
        title: "提示",
        message: "持续集成、自动化构建、 自动化部署、 自动化测试。",
      }).then((action) => {
        console.info(action);
      });
    };

    const onClickAlert2 = () => {
      Dialog.alert({
        message: "任何简单机械的重复劳动都应该让机器去完成。",
      }).then((action) => {
        console.info(action);
      });
    };

    const onClickConfirm = () => {
      Dialog.confirm({
        title: "提示",
        message:
          "JavaScript是函数式语言，函数可以实现类，类就是面向对象编程中最基本的概念",
      }).then((action) => {
        console.info(action);
      });
    };

    return { onClickAlert, onClickAlert2, onClickConfirm };
  },
});
</script>